<?php

class Benservi_Forms_ConsultaContratoGet extends Zend_Form{

    public function init(){

        $contrato = new Zend_Form_Element_Text('cpf');
        $contrato->setLabel('CPF:')
             ->setRequired(true)
             ->setAttrib('action', 'GET')
             ->addValidator('NotEmpty')
             ->addValidator('regex', true, array('/[0-9]/i'))
             ->getValidator('regex')->setMessage("É permitido apenas numeros.");
       
        $contrato->setDecorators(array(
                   'ViewHelper',
                  'Description',
                  array('Label', array('tag' => null)),
                  array('HtmlTag', array('tag' => 'p')),
        ));

        $submit = new Zend_Form_Element_Submit("submit");
        $submit->setLabel("Consultar");

        $this->addElements(array($contrato, $submit));

    }

}

?>
